<template>
  <div class="wrap">
    <div class="wrap_header">
      <div class="wrap_headerTitle">
        <div class="wrap_headerTitleRow">
          
          <span id="zuojiantou" @click="back" class="iconfont icon-arrow-left-copy-copy"></span>
        </div>
        <div class="wrap_headerTitleRow">
          <span>Maco蛋</span>
        </div>
        <!-- <div class="wrap_headerTitleRow">
          <div class="wrapBox">
            <span class="iconfont icon-weixinxiaochengxu"></span>
          </div>
        </div> -->
      </div>
      <div class="wrap_header_maco">
        <div class="wrap_header_maco_row">
          <div class="wrap_header_maco_row_img"></div>
          <div class="wrap_header_maco_row_num">
            <span class="num">{{numMaco}}</span>
          </div>
        </div>
        <div class="wrap_header_maco_row">
          <div class="wrap_herder_maco_row" @click="payM">
            <span>充值Maco蛋</span>
          </div>
          <div class="wrap_herder_maco_row">
            <span class="iconfont icon-arrow-left"></span>
          </div>
        </div>
      </div>
    </div>
    <div class="wrap_content">
      <div class="wrap_contentRow">
        <div class="wrap_contentRow_grid">
          <span>分享故事可获得<i class="i">10个</i>Maco蛋</span>
        </div>
        <div class="wrap_contentRow_grid">
          <button class="wrap_contentRow_gridBtn active">马上留言</button>
        </div>
      </div>

      <div class="wrap_contentRow">
        <div class="wrap_contentRow_grid">
          <span>登录可获得<i class="i">10个</i>Maco蛋</span>
        </div>
        <div class="wrap_contentRow_grid">
          <button class="wrap_contentRow_gridBtn">马上留言</button>
        </div>
      </div>

      <div class="wrap_contentRow">
        <div class="wrap_contentRow_grid">
          <span>留言可获得<i class="i">10个</i>Maco蛋</span>
        </div>
        <div class="wrap_contentRow_grid">
          <button class="wrap_contentRow_gridBtn active">马上留言</button>
        </div>
      </div>

      <div class="wrap_contentRow">
        <div class="wrap_contentRow_grid">
          <span>分享好友成为年度畅听VIP可获得<i class="i">600个</i>Maco蛋</span>
        </div>
        <div class="wrap_contentRow_grid">
          <button class="wrap_contentRow_gridBtn active">马上留言</button>
        </div>
      </div>

      <!-- 添加时添加整个div -->
    </div>
    <div class="wrap_memory">
      <div class="wrap_memoryTitle">
        <h4>Maco蛋收集记录</h4>
      </div>
      <div class="wrap_memoryLoginMsg">
        <span>登入获得10个maco蛋</span>
      </div>
      <div class="wrap_memoryLoginMsg wrap_memoryTimeMsg">
        2020-01-01 12:00:00
      </div>
    </div>
  </div>
</template>
<script>
import * as apis from "../../api/home"
export default {
  data() {
    return {
      numMaco:0
    };
    
  },
  mounted(){
        apis.numMaco({Id:this.$store.state.order.user.title}).then((data)=>{
        console.log(data.data.code[0].Maco)
        this.numMaco = data.data.code[0].Maco
      })

  },
  methods:{
    payM(){
      this.$router.push("/payMacoAge")
    },
    back() {
      this.$router.push("/my");
    },
  }
};
</script>
<style scoped>
@import url("../../../assets/font/iconfont.css");

.wrap_header {
  width: 100vw;
  height: 143px;
  box-shadow: 0px 1px #f8f8f8;
}
#zuojiantou{
  font-size: 24px;
  font-weight: 600;
  color: #C3C3C3;
  padding-left: 5px;
}
.wrap_headerTitle {
  width: 100%;
  height: 55px;
  display: flex;
  line-height: 55px;
}
.wrap_headerTitleRow:nth-child(1) {
  flex: 0.1;
}
.wrap_headerTitleRow:nth-child(1) span {
  font-size: 18px;
  color: #e1e1e1;
}
.wrap_headerTitleRow:nth-child(2) {
  flex: 0.6;
}
.wrap_headerTitleRow:nth-child(2) span {
  font-weight: bold;
  font-size: 18px;
}
.wrap_headerTitleRow:nth-child(3) {
  flex: 0.3;
}
.wrap_headerTitleRow:nth-child(3) span {
  font-size: 27px;
  color: #000;
  position: absolute;
  right: 22px;
  top: 2px;
}
.wrap_header_maco {
  width: 100%;
  height: calc(100% - 55px);
  display: flex;
}
.wrap_header_maco_row {
  flex: 1;
}
.wrap_header_maco_row:nth-child(1) {
  display: flex;
}
.wrap_header_maco_row_img {
  flex: 0.3;
  text-align: center;
  /* 后去插入图片需要修改 */
}
.wrap_header_maco_row_num {
  flex: 0.7;
  line-height: 88px;
  font-weight: bold;
}
.num {
  display: inline-block;
  margin-left: 15px;
}
.wrap_header_maco_row:nth-child(2) {
  display: flex;
  line-height: 88px;
  padding-left: 167px;
  color: #FF006E;
}
.wrap_header_maco_row:nth-child(2) .wrap_herder_maco_row:nth-child(2) span {
  font-size: 25px;
  
}
.wrap_content {
  height: auto;
  width: 100%;
  box-shadow: 0px 2px #f8f8f8;
  display: flex;
  flex-direction: column;
}
.wrap_contentRow {
  flex: 1;
  display: flex;
}
.wrap_contentRow_grid:nth-child(1) {
  flex: 0.7;
  padding-left: 10px;
}
.wrap_contentRow_grid:nth-child(1) span {
  font-size: 15px;
  font-weight: bold;
}
.i {
  display: inline-block;
  margin: 0 2px;
  font-style: normal;
  color: #eb447c;
  font-weight: bold;
}
.wrap_contentRow_grid {
  flex: 0.3;
  margin-bottom: 10px;
}
.wrap_contentRow_gridBtn {
  display: inline-block;
  border: none;
  border-radius: 35px;
  width: 85%;
  height: 30px;
  background: #cecece;
  color: white;
  font-weight: bold;
  line-height: 30px;
  text-align: center;
}
.wrap_contentRow_gridBtn.active {
  /* color: wheat; */
  background-color: #fe0070;
}
.wrap_memory div {
  margin: 10px 0;
}
.wrap_memoryLoginMsg {
  color: #d3d1d2;
}
</style>